package com.etl.borrow.model;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.xr.model.Model;

/**
 * <p>
 * 借款项目
 * </p>
 *
 * @author Arnold Yang
 * @since 2018-03-24
 */
@TableName("etl_borrow")
public class Borrow extends Model {

    private static final long serialVersionUID = 13L;

    /**
     * 标的id
     */
    @TableId(value = "borrow_id", type = IdType.AUTO)
    private Long borrowId;
    /**
     * 标题
     */
    private String title;
    /**
     * 副标题 
     */
    @TableField("sub_title")
    private String subTitle;
    /**
     * 借款人id
     */
    @TableField("user_id")
    private Long userId;
    /**
     * 状态
     */
    private Integer status;
    /**
     * 协议编号
     */
    @TableField("protocol_id")
    private Long protocolId;
    /**
     * 借款金额
     */
    private Double amount;
    /**
     * 已投金额
     */
    @TableField("invested_amount")
    private Double investedAmount;
    /**
     * 最小投标金额
     */
    @TableField("min_invest_amount")
    private Double minInvestAmount;
    /**
     * 应还款金额
     */
    @TableField("repayment_amount")
    private Double repaymentAmount;
    /**
     * 已还款金额
     */
    @TableField("repaymented_amount")
    private Double repaymentedAmount;
    /**
     * 借款期数
     */
    private Integer period;
    /**
     * 已还款期数
     */
    @TableField("repaymented_period")
    private Integer repaymentedPeriod;
    /**
     * 利率
     */
    private Double apr;
    /**
     * 还款方式
     */
    @TableField("repayment_type")
    private Integer repaymentType;
    /**
     * 投标开始时间（秒）
     */
    @TableField("invest_start_time")
    private Long investStartTime;
    /**
     * 投标结束时间（秒）
     */
    @TableField("invest_end_time")
    private Long investEndTime;
    /**
     * 每份金额
     */
    @TableField("per_partion_amount")
    private Double perPartionAmount;
    /**
     * 是否提前还款 0-否 1-是
     */
    private Integer prepayment;
    /**
     * 银行存管-标的录入订单号
     */
    @TableField("bank_order_id")
    private Long bankOrderId;
    /**
     * 银行存管-满标终审订单号
     */
    @TableField("bank_final_id")
    private Long bankFinalId;

    public Long getBorrowId() {
        return borrowId;
    }

    public void setBorrowId(Long borrowId) {
        this.borrowId = borrowId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getProtocolId() {
        return protocolId;
    }

    public void setProtocolId(Long protocolId) {
        this.protocolId = protocolId;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Double getInvestedAmount() {
        return investedAmount;
    }

    public void setInvestedAmount(Double investedAmount) {
        this.investedAmount = investedAmount;
    }

    public Double getMinInvestAmount() {
        return minInvestAmount;
    }

    public void setMinInvestAmount(Double minInvestAmount) {
        this.minInvestAmount = minInvestAmount;
    }

    public Double getRepaymentAmount() {
        return repaymentAmount;
    }

    public void setRepaymentAmount(Double repaymentAmount) {
        this.repaymentAmount = repaymentAmount;
    }

    public Double getRepaymentedAmount() {
        return repaymentedAmount;
    }

    public void setRepaymentedAmount(Double repaymentedAmount) {
        this.repaymentedAmount = repaymentedAmount;
    }

    public Integer getPeriod() {
        return period;
    }

    public void setPeriod(Integer period) {
        this.period = period;
    }

    public Integer getRepaymentedPeriod() {
        return repaymentedPeriod;
    }

    public void setRepaymentedPeriod(Integer repaymentedPeriod) {
        this.repaymentedPeriod = repaymentedPeriod;
    }

    public Double getApr() {
        return apr;
    }

    public void setApr(Double apr) {
        this.apr = apr;
    }

    public Integer getRepaymentType() {
        return repaymentType;
    }

    public void setRepaymentType(Integer repaymentType) {
        this.repaymentType = repaymentType;
    }

    public Long getInvestStartTime() {
        return investStartTime;
    }

    public void setInvestStartTime(Long investStartTime) {
        this.investStartTime = investStartTime;
    }

    public Long getInvestEndTime() {
        return investEndTime;
    }

    public void setInvestEndTime(Long investEndTime) {
        this.investEndTime = investEndTime;
    }

    public Double getPerPartionAmount() {
        return perPartionAmount;
    }

    public void setPerPartionAmount(Double perPartionAmount) {
        this.perPartionAmount = perPartionAmount;
    }

    public Integer getPrepayment() {
        return prepayment;
    }

    public void setPrepayment(Integer prepayment) {
        this.prepayment = prepayment;
    }

    public Long getBankOrderId() {
        return bankOrderId;
    }

    public void setBankOrderId(Long bankOrderId) {
        this.bankOrderId = bankOrderId;
    }

    public Long getBankFinalId() {
        return bankFinalId;
    }

    public void setBankFinalId(Long bankFinalId) {
        this.bankFinalId = bankFinalId;
    }

    @Override
    public String toString() {
        return "Borrow{" +
        ", borrowId=" + borrowId +
        ", title=" + title +
        ", subTitle=" + subTitle +
        ", userId=" + userId +
        ", status=" + status +
        ", protocolId=" + protocolId +
        ", amount=" + amount +
        ", investedAmount=" + investedAmount +
        ", minInvestAmount=" + minInvestAmount +
        ", repaymentAmount=" + repaymentAmount +
        ", repaymentedAmount=" + repaymentedAmount +
        ", period=" + period +
        ", repaymentedPeriod=" + repaymentedPeriod +
        ", apr=" + apr +
        ", repaymentType=" + repaymentType +
        ", investStartTime=" + investStartTime +
        ", investEndTime=" + investEndTime +
        ", perPartionAmount=" + perPartionAmount +
        ", prepayment=" + prepayment +
        ", bankOrderId=" + bankOrderId +
        ", bankFinalId=" + bankFinalId +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", version=" + version +
        ", feature=" + feature +
        "}";
    }
}
